package org.jeecgframework.codegenerate.generate.pojo;

import java.util.Map;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ColumnVo extends CgFormColumnExtendVo {
	public static final String OPTION_REQUIRED = "required:true";
	public static final String OPTION_NUMBER_INSEX = "precision:2,groupSeparator:','";
	private String fieldDbName;
	private String fieldName;
	private String filedComment = "";
	private String fieldType = "";
	private String fieldDbType = "";
	private String charmaxLength = "";
	private String precision;
	private String scale;
	private String nullable;
	private String classType = "";
	private String classType_row = "";
	private String optionType = "";

	public String getClassType_row() {
		return this.classType != null && this.classType.indexOf("easyui-") >= 0
				? this.classType.replaceAll("easyui-", "")
				: this.classType_row;
	}

	public String toString() {
		return "{\"fieldDbName\":\"" + this.fieldDbName + "\",\"fieldName\":\"" + this.fieldName
				+ "\",\"filedComment\":\"" + this.filedComment + "\",\"fieldType\":\"" + this.fieldType
				+ "\",\"fieldDbType\":\"" + this.fieldDbType + "\",\"classType\":\"" + this.classType
				+ "\",\"classType_row\":\"" + this.classType_row + "\",\"optionType\":\"" + this.optionType
				+ "\",\"charmaxLength\":\"" + this.charmaxLength + "\",\"precision\":\"" + this.precision
				+ "\",\"scale\":\"" + this.scale + "\",\"nullable\":\"" + this.nullable + "\",\"fieldLength\":\""
				+ this.fieldLength + "\",\"fieldHref\":\"" + this.fieldHref + "\",\"fieldValidType\":\""
				+ this.fieldValidType + "\",\"fieldDefault\":\"" + this.fieldDefault + "\",\"fieldShowType\":\""
				+ this.fieldShowType + "\",\"fieldOrderNum\":\"" + this.fieldOrderNum + "\",\"isKey\":\"" + this.isKey
				+ "\",\"isShow\":\"" + this.isShow + "\",\"isShowList\":\"" + this.isShowList + "\",\"isQuery\":\""
				+ this.isQuery + "\",\"uploadnum\":\"" + this.uploadnum + "\",\"defaultVal\":\"" + this.defaultVal
				+ "\",\"sort\":\"" + this.sort + "\",\"readonly\":\"" + this.readonly + "\",\"queryMode\":\""
				+ this.queryMode + "\",\"dictField\":\"" + this.dictField + "\",\"dictTable\":\"" + this.dictTable
				+ "\",\"dictText\":\"" + this.dictText + "\"}";
	}
}
